package day09;

import java.util.Scanner;

public class Study01 {
    public static void main(String[] args) {
        System.out.println("输入你要存入的金额：");
        Scanner scanner =new Scanner(System.in);
        double money=scanner.nextDouble();
        System.out.println("目前有四种年限的定期储蓄业务，分别是1年，2年，3年，5年；请输入你要存入的年限：");
        Scanner scanner1 =new Scanner(System.in);
        int year=scanner1.nextInt();
        if (money>=1000.00){
            if (year==1){
                double sum=money+money*0.0225*year;
                System.out.println("存："+year+"年到期大概能拿到"+sum+"元钱");
            }
            else if (year==2){
                double sum=money+money*0.027*year;
                System.out.println("存："+year+"年到期大概能拿到"+sum+"元钱");
            }
            else if (year==3){
                double sum=money+money*0.0325*year;
                System.out.println("存："+year+"年到期大概能拿到"+sum+"元钱");
            }
            else if (year==5){
                double sum=money+money*0.036*year;
                System.out.println("存"+year+"年到期大概能拿到"+sum+"元钱");
            }
        }else {
            System.out.println("请存入超过1000元的金额");
        }

    }
}
